package com.example.bookmall.entity.order;
import lombok.Getter;


import lombok.Getter;

@Getter // 仅生成getter方法，不生成setter（枚举字段应为不可变）
public enum OrderStatus {
    PENDING_PAYMENT(1, "待支付"),
    PENDING_SHIPMENT(2, "待发货"),
    PENDING_RECEIPT(3, "待收货"),
    COMPLETED(4, "已完成"),
    CANCELED(5, "已取消"),
    AFTER_SALES(6, "售后中"),
    AFTER_SALES_COMPLETED(7, "售后完成");

    private final Integer code;
    private final String desc;

    // 添加带参构造方法（必须为private，编译器会强制）
    OrderStatus(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}